package com.attendance.service.impl;

import com.attendance.mapper.HomeworkMapper;
import com.attendance.service.HomeWorkService;
import com.attendance.vo.ExaminehomeworkVO;
import com.attendance.vo.ExamineworkSituationVO;
import com.attendance.vo.HomeWorkVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by WYH on 2022/4/22 11:11
 */
@Service
@Transactional
public class HomeWorkImpl implements HomeWorkService {
    @Autowired
    private HomeworkMapper homeworkMapper;

    @Override
    public int selectStuId(HomeWorkVO homeWorkVO) {
        return homeworkMapper.selectStuId(homeWorkVO);
    }

    @Override
    public int insertHomework(HomeWorkVO homeWorkVO) {
        return homeworkMapper.insertHomework(homeWorkVO);
    }

    @Override
    public int selectCourseId(HomeWorkVO homeWorkVO) {
        return homeworkMapper.selectCourseId(homeWorkVO);
    }

    @Override
    public int insertPGC(HomeWorkVO homeWorkVO) {
        return homeworkMapper.insertPGC(homeWorkVO);
    }

    @Override
    public int insertStuHomework(HomeWorkVO homeWorkVO) {
        return homeworkMapper.insertStuHomework(homeWorkVO);
    }


    @Override
    public int selectProjectGroup(HomeWorkVO homeWorkVO) {
        return homeworkMapper.selectProjectGroup(homeWorkVO);
    }

    @Override
    public int insertStudentHomework(HomeWorkVO homeWorkVO) {
        return homeworkMapper.insertStudentHomework(homeWorkVO);
    }

    @Override
    public List<HomeWorkVO> SelectAllWork() {
        return homeworkMapper.SelectAllWork();
    }

    @Override
    public List<HomeWorkVO> SelectAllWorkByHomId(Integer homId) {
        return homeworkMapper.SelectAllWorkByHomId(homId);
    }

    @Override
    public List<HomeWorkVO> SelectStuHomeworkByDY(HomeWorkVO homeWorkVO) {
        return homeworkMapper.SelectStuHomeworkByDY(homeWorkVO);
    }

    @Override
    public List<ExaminehomeworkVO> SelectExaminehomeworkByConditionDT(ExaminehomeworkVO examinehomeworkVO) {
        return homeworkMapper.SelectExaminehomeworkByConditionDT(examinehomeworkVO);
    }

    @Override
    public int DeleteHomeworkByHomId(int homId) {
        return homeworkMapper.DeleteHomeworkByHomId(homId);
    }

    @Override
    public int UpdateExaminehomeworkByhomId(int homId, Float homeScore, String teaComment) {
        return homeworkMapper.UpdateExaminehomeworkByhomId(homId,homeScore,teaComment);
    }

    @Override
    public List<ExaminehomeworkVO> SelectworkTastByhomIdOrteaIdDT(int teaId) {
        return homeworkMapper.SelectworkTastByhomIdOrteaIdDT(teaId);
    }

    @Override
    public List<ExaminehomeworkVO> SelectworkTastByhomIdOrteaIdDT() {
        return homeworkMapper.SelectworkTastByhomIdOrteaIdDT();
    }

    @Override
    public List<ExaminehomeworkVO> SelectshJobContentByhomIdORstuId(int stuId) {
        return homeworkMapper.SelectshJobContentByhomIdORstuId(stuId);
    }

    @Override
    public List<ExamineworkSituationVO> SelectAllExamineworkSituation() {
        return homeworkMapper.SelectAllExamineworkSituation();
    }

    @Override
    public int UpdateShJobContentByHomIdOrStuId(String shJobContent, int homId, int stuId) {
        return homeworkMapper.UpdateShJobContentByHomIdOrStuId(shJobContent,homId,stuId);
    }


}
